#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <signal.h>

void doing(int sig)
{
    printf(" you get signal is  %d \n", sig);
}

int main(int argc, char **argv)
{

    struct itimerval newval = {{3, 0}, {2, 0}};
    signal(SIGALRM, doing);
    setitimer(ITIMER_REAL, &newval, NULL);
    while (1){
      pause();
    }

    return 0;
}